import React, {useState} from 'react';
import {connect} from 'react-redux';
import Taro from '@tarojs/taro';
import {View, Text} from '@tarojs/components';
import {AtButton, AtInput} from "taro-ui";
import './index.scss';

function Orders(){
  const [name, setName] = useState('');
  const [phone, setPhone] = useState(null);
    return (
        <View className='partnerWrap'>
          <View className='bannerInfo'>
            <View className='infoText'>
              <Text style={{color: '#ffffff'}}>南阳金冠智充</Text>
              <Text style={{color: '#ffff01'}}>招募</Text>
            </View>
            <View className='infoText'>
              <Text style={{color: '#ffff01'}}>城市合伙人</Text>
            </View>
          </View>
          <View className='introduce'>
            <View className='introduceCard'>
              <View className='titleLine'>
                <Text>新能源</Text>
                <Text>新基建</Text>
                <Text>新征程</Text>
              </View>
              <View className='tag'>
                您的权益
              </View>
              <View className='content'>
                <View>1、新能源7KW充电桩一台</View>
                <View>2、三年售后, 承诺三年收回投资成本</View>
                <View>3、充电收益企业分红及推广奖励</View>
              </View>
              <View className='tag'>
                企业分红
              </View>
              <View className='content'>
                <View>1、团队累计安装300台充电桩, 每月奖励充电收益1%</View>
                <View>2、团队累计安装800台充电桩, 每月奖励充电收益2%</View>
                <View>3、团队累计安装2000台充电桩, 每月奖励充电收益3%</View>
              </View>
              <View className='tag'>
                加盟流程
              </View>
              <View className='content'>
                <View>1、在线申请, 并支付加盟费</View>
                <View>2、线下运维实地安装充电桩</View>
                <View>3、推广合伙人拿奖励及充电收益</View>
              </View>
            </View>
          </View>
          <View className='pageFooter'>
              <View className='footerLine'>
                  <AtInput
                    name='name'
                    type='text'
                    border={false}
                    placeholder='联系人姓名'
                    value={name}
                    onChange={e => setName(e)}
                  />
              </View>
              <View className='footerLine'>
                  <AtInput
                    name='phone'
                    type='phone'
                    border={false}
                    placeholder='您的联系电话'
                    value={phone}
                    onChange={e => setPhone(e)}
                  />
              </View>
              <View className='footerLine'>
                  <AtButton
                    onClick={() => {
                        Taro.showToast({title: '申请已提交,请等待客服电话联系', icon: 'none', duration: 2000})
                    }}
                  >申请加入城市合伙人</AtButton>
              </View>
          </View>
        </View>
    )
}

export default connect(({order}) => {return {...order}})(Orders)
